<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- Meta, title, CSS, favicons, etc. -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Gentelella Alela! | </title>    <!-- Compiled CSS (includes Bootstrap, Font Awesome, and all vendor styles) -->
    <script type="module" src="/src/main-minimal-modern.js"></script>
</head>

<body class="nav-md">
    <div class="container body">
        <div class="main_container">
            <div class="col-md-3 left_col">
                <div class="left_col scroll-view">
                    <div class="navbar nav_title" style="border: 0;">
                        <a href="index.html" class="site_title"><img src="images/logo.svg" alt="Gentelella Alela!" class="logo-full" style="height: 40px;"><img src="images/logo-icon.svg" alt="Gentelella" class="logo-icon" style="height: 30px; display: none;"></a>
                    </div>

                    <div class="clearfix"></div>

                    <!-- menu profile quick info -->
                    <div class="profile clearfix">
                        <div class="profile_pic">
                            <img src="images/img.jpg" alt="..." class="img-circle profile_img">
                        </div>
                        <div class="profile_info">
                            <span>Welcome,</span>
                            <h4>John Doe</h4>
                        </div>
                    </div>
                    <!-- /menu profile quick info -->

                    <br />

                    <!-- sidebar menu -->
                    <div id="sidebar-menu" class="main_menu_side hidden-print main_menu">
                        <div class="menu_section">
                            <h3>General</h3>
                            <ul class="nav side-menu">
                                <li><a><i class="fas fa-home"></i> Home <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="index.html">Dashboard 1</a></li>
                                        <li><a href="index2.html">Dashboard 2</a></li>
                                        <li><a href="index3.html">Dashboard 3</a></li><li><a href="index4.html">Dashboard 4</a></li>
                      <li><a href="index3.html">Dashboard 3</a></li>
                                    </ul>
                                <li><a><i class="fas fa-edit"></i> Forms <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="form.html">General Form</a></li>
                                        <li><a href="form_advanced.html">Advanced Components</a></li>
                                        <li><a href="form_validation.html">Form Validation</a></li>
                                        <li><a href="form_wizards.html">Form Wizard</a></li>
                                        <li><a href="form_upload.html">Form Upload</a></li>
                                        <li><a href="form_buttons.html">Form Buttons</a></li>
                                    </ul>
                                <li><a><i class="fas fa-desktop"></i> UI Elements <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="general_elements.html">General Elements</a></li>
                                        <li><a href="media_gallery.html">Media Gallery</a></li>
                                        <li><a href="typography.html">Typography</a></li>
                                        <li><a href="icons.html">Icons</a></li>
                  
                                        <li><a href="widgets.html">Widgets</a></li>
                                        <li><a href="invoice.html">Invoice</a></li>
                                        <li><a href="inbox.html">Inbox</a></li>
                                        <li><a href="calendar.html">Calendar</a></li>
                                    </ul>
                                <li><a><i class="fas fa-table"></i> Tables <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="tables.html">Tables</a></li>
                                        <li><a href="tables_dynamic.html">Table Dynamic</a></li>
                                    </ul>
                                <li><a><i class="fas fa-chart-column"></i> Data Presentation <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="chartjs.html">Chart JS</a></li>
                                        <li><a href="chartjs2.html">Chart JS2</a></li>
                                        <li><a href="chart3.html">Chart JS3</a></li>
                                        <li><a href="echarts.html">ECharts</a></li>
                                        <li><a href="other_charts.html">Other Charts</a></li>
                                    </ul>
                                <li><a><i class="fas fa-clone"></i>Layouts <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="fixed_sidebar.html">Fixed Sidebar</a></li>
                                        <li><a href="fixed_footer.html">Fixed Footer</a></li>
                                    </ul>
                            </ul>
                        </div>
                        <div class="menu_section">
                            <h3>Live On</h3>
                            <ul class="nav side-menu">
                                <li><a><i class="fas fa-bug"></i> Additional Pages <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="e_commerce.html">E-commerce</a></li>
                                        <li><a href="projects.html">Projects</a></li>
                                        <li><a href="project_detail.html">Project Detail</a></li>
                                        <li><a href="contacts.html">Contacts</a></li>
                                        <li><a href="profile.html">Profile</a></li>
                                    </ul>
                                <li><a><i class="fas fa-window-restore"></i> Extras <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="page_403.html">403 Error</a></li>
                                        <li><a href="page_404.html">404 Error</a></li>
                                        <li><a href="page_500.html">500 Error</a></li>
                                        <li><a href="plain_page.html">Plain Page</a></li>
                                        <li><a href="login.html">Login Page</a></li>
                                        <li><a href="pricing_tables.html">Pricing Tables</a></li>
                                    </ul>
                                <li><a><i class="fas fa-sitemap"></i> Multilevel Menu <span class="fas fa-chevron-down"></span></a>
                                    <ul class="nav child_menu">
                                        <li><a href="#level1_1">Level One</a></li>
                                        <li><a>Level One<span class="fas fa-chevron-down"></span></a>
                                            <ul class="nav child_menu">
                                                <li class="sub_menu"><a href="level2.html">Level Two</a>
                                                <li><a href="#level2_1">Level Two</a>
                                                <li><a href="#level2_2">Level Two</a>
                                            </ul>
                                        <li><a href="#level1_2">Level One</a></li>
                                    </ul>
                                <li><a href="landing.html"><i class="fas fa-laptop"></i> Landing Page</a></li>
                            </ul>
                        </div>

                    </div>
                    <!-- /sidebar menu -->

                    <!-- /menu footer buttons -->
                    <div class="sidebar-footer hidden-small">
                        <a data-bs-toggle="tooltip" data-bs-placement="top" title="Settings">
                            <span class="fas fa-cog" aria-hidden="true"></span>
                        </a>
                        <a data-bs-toggle="tooltip" data-bs-placement="top" title="FullScreen">
                            <span class="fas fa-expand" aria-hidden="true"></span>
                        </a>
                        <a data-bs-toggle="tooltip" data-bs-placement="top" title="Lock">
                            <span class="fas fa-eye-slash" aria-hidden="true"></span>
                        </a>
                        <a data-bs-toggle="tooltip" data-bs-placement="top" title="Logout" href="login.html">
                            <span class="fas fa-power-off" aria-hidden="true"></span>
                        </a>
                    </div>
                    <!-- /menu footer buttons -->
                </div>
            </div>

            <!-- top navigation -->
            <div class="top_nav">
                <div class="nav_menu">
                    <div class="nav toggle">
                        <a id="menu_toggle"><i class="fas fa-bars"></i></a>
                    </div>
                    <nav class="nav navbar-nav">
                        <ul class="navbar-right">
                            <li class="nav-item dropdown open" style="padding-left: 15px;">
                                <a href="javascript:;" class="user-profile dropdown-toggle" aria-haspopup="true" id="navbarDropdown" data-bs-toggle="dropdown" aria-expanded="false">
                                    <img src="images/img.jpg" alt="">John Doe
                                </a>
                                <div class="dropdown-menu dropdown-usermenu float-end" aria-labelledby="navbarDropdown">
                                    <a class="dropdown-item" href="javascript:;"> Profile</a>
                                    <a class="dropdown-item" href="javascript:;">
                                        <span class="badge bg-red float-end">50%</span>
                                        <span>Settings</span>
                                    </a>
                                    <a class="dropdown-item" href="javascript:;">Help</a>
                                    <a class="dropdown-item" href="login.html"><i class="fas fa-sign-out-alt float-end"></i> Log Out</a>
                                </div>

                            <li role="presentation" class="nav-item dropdown open">
                                <a href="javascript:;" class="dropdown-toggle info-number" id="navbarDropdown1" data-bs-toggle="dropdown" aria-expanded="false">
                                    <i class="fas fa-envelope"></i>
                                    <span class="badge bg-green">6</span>
                                </a>
                                <ul class="dropdown-menu list-unstyled msg_list" role="menu" aria-labelledby="navbarDropdown1">
                                    <li class="nav-item">
                                        <a class="dropdown-item">
                                            <span class="image"><img src="images/img.jpg" alt="Profile Image" /></span>
                                            <span>
                                                <span>John Smith</span>
                                                <span class="time">3 mins ago</span>
                                            </span>
                                            <span class="message">
                                                Film festivals used to be do-or-die moments for movie makers. They were where...
                                            </span>
                                        </a>
                                    <li class="nav-item">
                                        <a class="dropdown-item">
                                            <span class="image"><img src="images/img.jpg" alt="Profile Image" /></span>
                                            <span>
                                                <span>John Smith</span>
                                                <span class="time">3 mins ago</span>
                                            </span>
                                            <span class="message">
                                                Film festivals used to be do-or-die moments for movie makers. They were where...
                                            </span>
                                        </a>
                                    <li class="nav-item">
                                        <a class="dropdown-item">
                                            <span class="image"><img src="images/img.jpg" alt="Profile Image" /></span>
                                            <span>
                                                <span>John Smith</span>
                                                <span class="time">3 mins ago</span>
                                            </span>
                                            <span class="message">
                                                Film festivals used to be do-or-die moments for movie makers. They were where...
                                            </span>
                                        </a>
                                    <li class="nav-item">
                                        <a class="dropdown-item">
                                            <span class="image"><img src="images/img.jpg" alt="Profile Image" /></span>
                                            <span>
                                                <span>John Smith</span>
                                                <span class="time">3 mins ago</span>
                                            </span>
                                            <span class="message">
                                                Film festivals used to be do-or-die moments for movie makers. They were where...
                                            </span>
                                        </a>
                                    <li class="nav-item">
                                        <div class="text-center">
                                            <a class="dropdown-item">
                                                <strong>See All Alerts</strong>
                                                <i class="fas fa-angle-right"></i>
                                            </a>
                                        </div>
                                </ul>
                        </ul>
                    </nav>
                </div>
            </div>
            <!-- /top navigation -->

            <!-- page content -->
            <div class="right_col" role="main">
                <div class="">
                    <div class="page-title">
                        <div class="title_left">
                            <h3>Form Validation</h3>
                        </div>

                        <div class="title_right">
                            <div class="col-md-5 col-sm-5 mb-3 float-end top_search">
                                <div class="input-group search-bar-fix">
                                    <input type="text" class="form-control" placeholder="Search for...">
                                    <button class="btn btn-outline-secondary" type="button">
                                      <i class="fas fa-search"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="clearfix"></div>

                    <div class="row">
                        <div class="col-md-12 col-sm-12">
                            <div class="x_panel">
                                <div class="x_title">
                                    <h4>Form validation <small>sub title</small></h4>
                                    <ul class="nav navbar-right panel_toolbox">
                                        <li><a class="collapse-link"><i class="fas fa-chevron-up"></i></a>
                                        <li class="dropdown">
                                            <a href="#" class="dropdown-toggle" data-bs-toggle="dropdown" role="button" aria-expanded="false"><i class="fas fa-wrench"></i></a>
                                            <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
                                                <a class="dropdown-item" href="#">Settings 1</a>
                                                <a class="dropdown-item" href="#">Settings 2</a>
                                            </div>
                                        <li><a class="btn-btn-close-link"><i class="fas fa-times"></i></a>
                                    </ul>
                                    <div class="clearfix"></div>
                                </div>
                                <div class="x_content">
                                    <div class="alert alert-info">
                                        <strong>Bootstrap 5 Form Validation</strong> - This form uses modern Bootstrap 5 validation with custom feedback messages and styles.
                                    </div>
                                    
                                    <form class="row g-3 needs-validation" novalidate>
                                        <div class="col-md-12">
                                            <h5 class="text-primary mb-3">Personal Information</h5>
                                        </div>
                                        
                                        <!-- First Name -->
                                        <div class="col-md-6">
                                            <label for="firstName" class="form-label">First Name <span class="text-danger">*</span></label>
                                            <input type="text" class="form-control" id="firstName" name="firstName" required minlength="2">
                                            <div class="valid-feedback">
                                                Looks good!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide a valid first name (minimum 2 characters).
                                            </div>
                                        </div>
                                        
                                        <!-- Last Name -->
                                        <div class="col-md-6">
                                            <label for="lastName" class="form-label">Last Name <span class="text-danger">*</span></label>
                                            <input type="text" class="form-control" id="lastName" name="lastName" required minlength="2">
                                            <div class="valid-feedback">
                                                Looks good!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide a valid last name (minimum 2 characters).
                                            </div>
                                        </div>
                                        
                                        <!-- Email -->
                                        <div class="col-md-6">
                                            <label for="email" class="form-label">Email Address <span class="text-danger">*</span></label>
                                            <input type="email" class="form-control" id="email" name="email" required>
                                            <div class="valid-feedback">
                                                Email looks good!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide a valid email address.
                                            </div>
                                        </div>
                                        
                                        <!-- Phone -->
                                        <div class="col-md-6">
                                            <label for="phone" class="form-label">Phone Number <span class="text-danger">*</span></label>
                                            <input type="tel" class="form-control" id="phone" name="phone" required pattern="[0-9\-\+\s\(\)]{8,20}">
                                            <div class="valid-feedback">
                                                Phone number is valid!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide a valid phone number (8-20 characters).
                                            </div>
                                        </div>
                                        
                                        <!-- Occupation -->
                                        <div class="col-md-6">
                                            <label for="occupation" class="form-label">Occupation</label>
                                            <input type="text" class="form-control" id="occupation" name="occupation" minlength="3">
                                            <div class="valid-feedback">
                                                Great!
                                            </div>
                                            <div class="invalid-feedback">
                                                Occupation must be at least 3 characters long.
                                            </div>
                                        </div>
                                        
                                        <!-- Age -->
                                        <div class="col-md-6">
                                            <label for="age" class="form-label">Age <span class="text-danger">*</span></label>
                                            <input type="number" class="form-control" id="age" name="age" required min="18" max="100">
                                            <div class="valid-feedback">
                                                Age is valid!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide a valid age (18-100).
                                            </div>
                                        </div>
                                        
                                        <!-- Date of Birth -->
                                        <div class="col-md-6">
                                            <label for="birthDate" class="form-label">Date of Birth <span class="text-danger">*</span></label>
                                            <input type="date" class="form-control" id="birthDate" name="birthDate" required>
                                            <div class="valid-feedback">
                                                Date looks good!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide your date of birth.
                                            </div>
                                        </div>
                                        
                                        <!-- Gender -->
                                        <div class="col-md-6">
                                            <label for="gender" class="form-label">Gender <span class="text-danger">*</span></label>
                                            <select class="form-select" id="gender" name="gender" required>
                                                <option selected disabled value="">Choose...</option>
                                                <option value="male">Male</option>
                                                <option value="female">Female</option>
                                                <option value="other">Other</option>
                                                <option value="prefer-not-to-say">Prefer not to say</option>
                                            </select>
                                            <div class="valid-feedback">
                                                Selection looks good!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please select a gender.
                                            </div>
                                        </div>
                                        
                                        <div class="col-md-12">
                                            <h5 class="text-primary mb-3 mt-4">Security Information</h5>
                                        </div>
                                        
                                        <!-- Password -->
                                        <div class="col-md-6">
                                            <label for="password" class="form-label">Password <span class="text-danger">*</span></label>
                                            <div class="position-relative">
                                                <input type="password" class="form-control pe-5" id="password" name="password" required 
                                                       pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*]).{8,}" 
                                                       title="Must contain at least 8 characters including uppercase, lowercase, number, and special character">
                                                <button type="button" class="btn btn-link position-absolute end-0 top-50 translate-middle-y pe-3" id="togglePassword" style="border: none; background: none; z-index: 10;">
                                                    <i class="fas fa-eye text-muted" id="passwordIcon"></i>
                                                </button>
                                            </div>
                                            <div class="valid-feedback">
                                                Strong password!
                                            </div>
                                            <div class="invalid-feedback">
                                                Password must be at least 8 characters with uppercase, lowercase, number, and special character.
                                            </div>
                                        </div>
                                        
                                        <!-- Confirm Password -->
                                        <div class="col-md-6">
                                            <label for="confirmPassword" class="form-label">Confirm Password <span class="text-danger">*</span></label>
                                            <div class="position-relative">
                                                <input type="password" class="form-control pe-5" id="confirmPassword" name="confirmPassword" required>
                                                <button type="button" class="btn btn-link position-absolute end-0 top-50 translate-middle-y pe-3" id="toggleConfirmPassword" style="border: none; background: none; z-index: 10;">
                                                    <i class="fas fa-eye text-muted" id="confirmPasswordIcon"></i>
                                                </button>
                                            </div>
                                            <div class="valid-feedback">
                                                Passwords match!
                                            </div>
                                            <div class="invalid-feedback">
                                                Passwords do not match.
                                            </div>
                                        </div>
                                        
                                        <div class="col-md-12">
                                            <h5 class="text-primary mb-3 mt-4">Additional Information</h5>
                                        </div>
                                        
                                        <!-- Message -->
                                        <div class="col-md-12">
                                            <label for="message" class="form-label">Message <span class="text-danger">*</span></label>
                                            <textarea class="form-control" id="message" name="message" rows="4" required minlength="10"></textarea>
                                            <div class="valid-feedback">
                                                Message looks good!
                                            </div>
                                            <div class="invalid-feedback">
                                                Please provide a message (minimum 10 characters).
                                            </div>
                                        </div>
                                        
                                        <!-- Terms and Conditions -->
                                        <div class="col-12">
                                            <div class="form-check">
                                                <input class="form-check-input" type="checkbox" value="" id="agreeTerms" required>
                                                <label class="form-check-label" for="agreeTerms">
                                                    I agree to the <a href="#" class="text-decoration-none">Terms and Conditions</a> <span class="text-danger">*</span>
                                                </label>
                                                <div class="invalid-feedback">
                                                    You must agree to the terms and conditions before submitting.
                                                </div>
                                            </div>
                                        </div>
                                        
                                        <!-- Newsletter Subscription -->
                                        <div class="col-12">
                                            <div class="form-check">
                                                <input class="form-check-input" type="checkbox" value="" id="newsletter">
                                                <label class="form-check-label" for="newsletter">
                                                    Subscribe to our newsletter for updates
                                                </label>
                                            </div>
                                        </div>
                                        
                                        <!-- Submit Buttons -->
                                        <div class="col-12">
                                            <hr class="my-4">
                                            <button class="btn btn-primary me-2" type="submit">
                                                <i class="fas fa-check me-2"></i>Submit Form
                                            </button>
                                            <button class="btn btn-secondary" type="reset">
                                                <i class="fas fa-undo me-2"></i>Reset Form
                                            </button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- /page content -->

            <!-- footer content -->
            <footer>
                <div class="float-end">
                    Gentelella - Bootstrap Admin Template by <a href="https://colorlib.com">Colorlib</a>
                </div>
                <div class="clearfix"></div>
            </footer>
            <!-- /footer content -->
        </div>
    </div>


    <!-- Bootstrap 5 Form Validation JavaScript -->
    <script>
        // Bootstrap 5 Form Validation
        (function() {
            'use strict';
            
            // Fetch all the forms we want to apply custom Bootstrap validation styles to
            var forms = document.querySelectorAll('.needs-validation');
            
            // Loop over them and prevent submission
            Array.prototype.slice.call(forms).forEach(function(form) {
                form.addEventListener('submit', function(event) {
                    if (!form.checkValidity()) {
                        event.preventDefault();
                        event.stopPropagation();
                    } else {
                        // Form is valid, you can submit it or perform other actions
                        event.preventDefault(); // Remove this line if you want to actually submit the form
                        alert('Form submitted successfully! (This is just a demo)');
                    }
                    
                    form.classList.add('was-validated');
                }, false);
                
                // Reset form validation when reset button is clicked
                form.addEventListener('reset', function(event) {
                    form.classList.remove('was-validated');
                }, false);
            });
            
            // Password visibility toggles
            const togglePassword = document.getElementById('togglePassword');
            const password = document.getElementById('password');
            const passwordIcon = document.getElementById('passwordIcon');
            
            const toggleConfirmPassword = document.getElementById('toggleConfirmPassword');
            const confirmPasswordField = document.getElementById('confirmPassword');
            const confirmPasswordIcon = document.getElementById('confirmPasswordIcon');
            
            // Main password toggle
            if (togglePassword && password && passwordIcon) {
                togglePassword.addEventListener('click', function() {
                    // Toggle password visibility
                    const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
                    password.setAttribute('type', type);
                    
                    // Toggle icon
                    passwordIcon.classList.toggle('fa-eye');
                    passwordIcon.classList.toggle('fa-eye-slash');
                });
            }
            
            // Confirm password toggle
            if (toggleConfirmPassword && confirmPasswordField && confirmPasswordIcon) {
                toggleConfirmPassword.addEventListener('click', function() {
                    // Toggle password visibility
                    const type = confirmPasswordField.getAttribute('type') === 'password' ? 'text' : 'password';
                    confirmPasswordField.setAttribute('type', type);
                    
                    // Toggle icon
                    confirmPasswordIcon.classList.toggle('fa-eye');
                    confirmPasswordIcon.classList.toggle('fa-eye-slash');
                });
            }
            
            // Custom validation for password confirmation
            if (confirmPasswordField && password) {
                confirmPasswordField.addEventListener('input', function() {
                    if (this.value !== password.value) {
                        this.setCustomValidity('Passwords do not match');
                    } else {
                        this.setCustomValidity('');
                    }
                });
                
                password.addEventListener('input', function() {
                    if (confirmPasswordField.value && confirmPasswordField.value !== this.value) {
                        confirmPasswordField.setCustomValidity('Passwords do not match');
                    } else {
                        confirmPasswordField.setCustomValidity('');
                    }
                });
            }
            
            // Real-time validation feedback
            const inputs = document.querySelectorAll('input, select, textarea');
            inputs.forEach(function(input) {
                input.addEventListener('blur', function() {
                    if (this.btn-closest('form').classList.contains('was-validated')) {
                        this.checkValidity();
                    }
                });
                
                input.addEventListener('input', function() {
                    if (this.btn-closest('form').classList.contains('was-validated')) {
                        this.checkValidity();
                    }
                });
            });
        })();
    </script>    <!-- Compiled JavaScript (includes jQuery, Bootstrap, and all vendor scripts) -->
    

</body>

</html>
